@extends('admin.layout.app')
@section('title', '单位信息管理')

@section('nav')
    @include('admin.layout.nav', ['title'=> ['系统管理','单位信息管理']])
@endsection

@section('content')
    <div class="box box-primary">
        <div class="box-header with-border">
            <h3 class="box-title">单位信息管理</h3>
        </div>
        <!-- /.box-header -->
        <!-- form start -->
        <form role="form" action="" method="post" id="update-form">
            {{csrf_field()}}
            <div class="box-body">
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label for="oldpwd">单位名称：</label>
                            <input type="text" class="form-control" value="{{old('old_pwd')}}" name="old_pwd" id="oldpwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">省份：</label>
                            <input type="text" class="form-control" name="new_pwd" value="{{old('new_pwd')}}" id="new_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">邮政编码：</label>
                            <input type="text" class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">联系人姓名：</label>
                            <input type="text" class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">联系人座机：</label>
                            <input type="text" class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">法人姓名：</label>
                            <input type="text" class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">单位属性：</label>
                            <input type="text" disabled class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">主管单位：</label>
                            <input type="text" class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">出版者前缀：</label>
                            <input type="text" class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">报送上级单位：</label>
                            <input type="text" disabled class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label for="oldpwd">单位简称：</label>
                            <input type="text" class="form-control" value="{{old('old_pwd')}}" name="old_pwd" id="oldpwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">地址：</label>
                            <input type="text" class="form-control" name="new_pwd" value="{{old('new_pwd')}}" id="new_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">网址：</label>
                            <input type="text" class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">联系人手机：</label>
                            <input type="text" class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">联系人邮箱：</label>
                            <input type="text" class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">法人电话：</label>
                            <input type="text" class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">主办单位：</label>
                            <input type="text" class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">主管单位电话：</label>
                            <input type="text" class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">出版权限：</label>
                            <input type="text" disabled class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                        <div class="form-group">
                            <label for="oldpwd">旧单位名称：</label>
                            <input type="text" disabled class="form-control" name="confirm_pwd" value="{{old('confirm_pwd')}}" id="confirm_pwd" placeholder="请输入旧密码">
                        </div>
                    </div>
                </div>

            </div>
            <!-- /.box-body -->

            <div class="box-footer">
                <input type="submit" class="btn btn-primary"  value="提交"/>
            </div>
        </form>
    </div>
@endsection

@section('style')
    <style>

    </style>
@endsection

@section('script')
    <script type="text/javascript" src="/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
    <script type="text/javascript" src="/lib/jquery.validation/1.14.0/validate-methods.js"></script>
    <script type="text/javascript" src="/lib/jquery.validation/1.14.0/messages_zh.js"></script>
    <script >
        $(function(){
            $("#update-form").validate({
                rules: {
                    username: {
                        required: true,
                        minlength: 2
                    },
                    pwd: {
                        required: true,
                        minlength: 5
                    },
                    code: {
                        required: true
                    }
                },
                messages: {
                    username: {
                        required: "请输入用户名",
                        minlength: "用户名必需由两个字母组成",
                        maxlength: '用户名不能超过50个字符'
                    },
                    pwd: {
                        required: "请输入密码",
                        minlength: "密码长度不能小于 6 个字母",
                        maxlenght: "密码不能超过20个字符"
                    }
                }
            })
        })
    </script>
@endsection